package com.mikufufu.blog.controller.admin;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.mikufufu.blog.common.entity.AjaxResult;
import com.mikufufu.blog.model.dto.admin.LogDto;
import com.mikufufu.blog.model.entity.OperateLog;
import com.mikufufu.blog.service.OperateLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/admin/log")
@Api(value="操作日志表", tags = "操作日志表接口")
public class OperateLogAdminController {

    @Autowired
    private OperateLogService operateLogService;

    @PostMapping("/page")
    @ApiOperation("通过主键获取操作日志表信息")
    public AjaxResult<IPage<OperateLog>> page(@RequestBody LogDto logDto) {
        return AjaxResult.data(operateLogService.getPage(logDto));
    }

}
